//
//  HMBaseViewController.m
//  localLife
//
//  Created by Limonwei on 15/11/23.
//  Copyright © 2015年 heima. All rights reserved.
//

#import "HMBaseViewController.h"
#import "UIView+Toast.h"
#import "MBProgressHUD.h"

@interface HMBaseViewController ()

//网络加载菊花视图
@property(nonatomic,strong)MBProgressHUD *HUD;

@end

@implementation HMBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    //随机颜色
    //self.view.backgroundColor = [UIColor colorWithRed:rand()%255/255.0 green:rand()%255/255.0 blue:rand()%255/255.0 alpha:1.0];
}

-(void)SHOWloadView{
    
    self.HUD = [[MBProgressHUD alloc]initWithView:self.view];
    
    [self.HUD show:YES];
    
    [self.view addSubview:_HUD];
    
    
    
    
}

-(void)dismissLoadView{
    
    if (_HUD) {
        [_HUD removeFromSuperview];
        
        [_HUD hide:YES];
        
        _HUD = nil;
    }
    
    
}

-(void)showToast:(NSString *)message{
    
    
    [self.view makeToast:message];
    
    
    
    
    
}
@end















